﻿using Farming.Domain;
using Farming.Domain.Output;
using Farming.Repositories;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http.HttpResults;
using Microsoft.AspNetCore.Mvc;
using Panda.DynamicWebApi;
using Panda.DynamicWebApi.Attributes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Farming.Service
{
    [DynamicWebApi]
    [ApiExplorerSettings(GroupName = "v1")]
    [Authorize]
    public class LogMesService:IDynamicWebApi
    {
        IRepository<LogMessage> logre;
        public LogMesService(IRepository<LogMessage> logre)
        {
            this.logre = logre;
        }
        [HttpGet]
        public object GetLog()
        {
            var result = logre.GetAllAsync().Result;
            

            return result;
        }


    }
}
